/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package networkrespnse;

import core.ParameterDecoder;
import utils.Utils;
/**
 *
 * @author Kvest
 */
public class UnRegisterOnTaxiParkingResponse extends Response
{
    private int unregistered;

    public UnRegisterOnTaxiParkingResponse(byte[] data)
    {
        super(UNREGISTER_ON_TAXI_PARKING_RESPONSE);
        unregistered = 0;

        parse(data);
    }

    protected void parse(byte[] data)
    {
        byte[] body,temp;
        int index;
        //��������  body
        body = ParameterDecoder.getTransferBody(data);
        //������������� ��������
        temp = new byte[4];
        index = 0;
        for (int i=0;i<4;i++)
        {
                temp[i] = body[index++];
        }
        index += Utils.byteToInt(temp);
        //Unregistered
        temp[0] = body[index++];
        temp[1] = 0;
        temp[2] = 0;
        temp[3] = 0;
        unregistered = Utils.byteToInt(temp);
    }

    public int getUnregistered()
    {
        return unregistered;
    }
}
